﻿module Program
open Space
open System

printfn "What is the name of the starsystem? \n"
let SystemName = Console.ReadLine()
let MySystem = new Starsystem(SystemName)
printfn "How many planets does it have? \n"
let StrNoOfPlanets = Console.ReadLine()
let (success, parsed) = Int32.TryParse(StrNoOfPlanets)
for i in 1 .. parsed do 
    printfn "What is the name of planet no. %d? \n" i
    let PlanetName = Console.ReadLine()
    printfn "Thank you, what is the radius of the planet?"
    let RadiusStr = Console.ReadLine()
    let (success, radius) = Int32.TryParse(RadiusStr)
    let MyPlanet = new Planet(PlanetName, Minshara, ["rock"; "iron"], (float)radius, SystemName)
    MySystem.Planets.Add(MyPlanet)

let x : int  = 0

for i in MySystem.Planets do
    let x = x + 1
    printfn "Planet %d : %s" x i.name

printfn "System %s" MySystem.Name
Console.ReadKey(true)
